recreate

open fun recreate(@NonNull activity: Activity)(source)

Cause the given Activity to be recreated with a new instance. This version of the method allows a consistent behavior across API levels, emulating what happens on Android Pie (and newer) when running on older platforms.

Parameters

activity

The activity to recreate